package com.itheima.stream;

import java.util.ArrayList;
import java.util.stream.Stream;

public class StreamDemo07 {
    public static void main(String[] args) {
        ArrayList<String> manlist=new ArrayList<>();
        ArrayList<String> womenlist=new ArrayList<>();
        manlist.add("朱一龙");
        manlist.add("邓伦");
        manlist.add("王嘉尔");
        manlist.add("王一博");
        manlist.add("肖战");
        womenlist.add("古力娜扎");
        womenlist.add("迪丽热巴");
        womenlist.add("白冰");
        womenlist.add("赵露思");
        womenlist.add("杨幂");
        Stream<String> stream1 = womenlist.stream().filter(name -> name.length() == 4).skip(1);
        Stream<String> stream2 = manlist.stream().filter(name -> name.length()==3).limit(1);
        Stream.concat(stream1, stream2).forEach(name->{
            Actor actor = new Actor(name);
            System.out.println(actor);
        });


    }
}
